<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理平台</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="../../css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="../../css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="../../css/plugins/jsTree/style.min.css" rel="stylesheet">
    <link href="../../css/animate.min.css" rel="stylesheet">
    <link href="../../css/style.min.css?v=4.0.0" rel="stylesheet">
    <link href="http://cdn.bootcss.com/bootstrap-modal/2.1.0/bootstrap-modal.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../../plugins/layui/css/layui.css">
    <base target="_blank">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">
        <div class="col-sm-6">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>菜单管理</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link" id="menu-add">
                            <i class="fa fa-plus"></i>
                        </a>
                        <a class="collapse-link" id="menu-edit">
                            <i class="fa fa-edit"></i>
                        </a>
                        <a class="collapse-link" id="menu-del">
                            <i class="fa fa-trash"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div id="menuTree"></div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>权限管理</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link" id="permission-add">
                            <i class="fa fa-plus"></i>
                        </a>
                        <a class="collapse-link" id="permission-edit">
                            <i class="fa fa-edit"></i>
                        </a>
                        <a class="collapse-link" id="permission-del">
                            <i class="fa fa-trash"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <table id="table"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="menu_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">菜单管理</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal layui-form" method="post" action="">
                    <input type="hidden" name="id" value="0" />
                    <input type="hidden" name="type" value="menu" />
                    <input type="hidden" name="parentId" lay-verify="parentId" class="form-control" value="0" />
                    <div class="form-group">
                        <label for="" class="col-md-2 col-md-offset-2 control-label">父菜单</label>
                        <div class="col-md-4">
                            <input type="text" name="parent" class="form-control" value="" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="" class="col-md-2 col-md-offset-2 control-label">菜单名称</label>
                        <div class="col-md-4">
                            <input type="text" name="text" lay-verify="text" class="form-control" value="{{d.text}}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="" class="col-md-2 col-md-offset-2 control-label">图标</label>
                        <div class="col-md-4">
                            <input type="text" name="icon" lay-verify="icon" class="form-control" value="{{d.icon}}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="" class="col-md-3 col-md-offset-1 control-label">菜单地址</label>
                        <div class="col-md-4">
                            <input type="text" name="url" class="form-control" value="{{d.url}}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="" class="col-md-3 col-md-offset-1 control-label">排序</label>
                        <div class="col-md-4">
                            <input type="text" name="sort" lay-verify="sort" class="form-control" value="{{d.sort}}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-2 col-md-offset-4">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        </div>
                        <div class="col-md-2">
                            <button type="button" lay-submit lay-filter="menu" class="btn btn-primary">保存</button>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
</div>
<div class="modal fade" id="permission_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" >权限管理</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal layui-form" method="post" action="">
                    <input type="hidden" name="id" value="0" />
                    <input type="hidden" name="parentId" value="0" />
                    <input type="hidden" name="type" value="button" />
                    <div class="form-group">
                        <label for="" class="col-md-2 col-md-offset-2 control-label">名称</label>
                        <div class="col-md-4">
                            <input type="text" name="text" lay-verify="text" class="form-control" value="" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="" class="col-md-3 col-md-offset-1 control-label">权限表达式</label>
                        <div class="col-md-4">
                            <input type="text" name="permission" lay-verify="permission" class="form-control" value="" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-2 col-md-offset-4">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        </div>
                        <div class="col-md-2">
                            <button type="button" lay-submit lay-filter="permission" class="btn btn-primary">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

    <script src="../../js/jquery.min.js?v=2.1.4"></script>
    <script src="../../js/bootstrap.min.js?v=3.3.5"></script>
    <script src="http://cdn.bootcss.com/bootstrap-table/1.9.1/bootstrap-table.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap-table/1.9.1/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="../../js/plugins/form/3.51.0/jquery.form.min.js"></script>
    <script type="text/javascript" src="http://cdn.bootcss.com/jquery-validate/1.11.1/jquery.validate.min.js"></script>
    <script src="../../js/plugins/jsTree/jstree.min.js"></script>
    <script src="../../plugins/layui/layui.js"></script>
    <script>
        layui.config({
            base: '../../scripts/common/', //你的模块目录
            version : parent.layui.cache.version
        }).use('../app/admin/menu'); //加载入口
    </script>

    <style>
        .jstree-open > .jstree-anchor > .fa-folder:before {
            content: "\f07c"
        }
        .jstree-default .jstree-icon.none {
            width: 0
        }
        .modal.fade.in {
            top: 20%;
        }
    </style>
</body>
</html>